package com.weiaibenpao.demo.chislim.presenter;

import com.weiaibenpao.demo.chislim.base.BasePresenter;
import com.weiaibenpao.demo.chislim.retrofit.RetrofitUtils;
import com.weiaibenpao.demo.chislim.retrofit.rx.LoadingTransformer;
import com.weiaibenpao.demo.chislim.retrofit.rx.NetWorkTransformer;
import com.weiaibenpao.demo.chislim.retrofit.rx.SimpleObserver;
import com.weiaibenpao.demo.chislim.view.FeedbackView;

/**
 * Created by wlx on 2018/1/16.
 */

public class FeedbackPresenter extends BasePresenter<FeedbackView> {
    /**
     * GET/fans/getAttentionList  关注列表分页接口
     */
    public void getAttentionList(int userId,String content) {
        RetrofitUtils.getAPIService().postFeedback(userId, content).
                compose(new NetWorkTransformer()).
                compose(new LoadingTransformer<>(mContext)).
                subscribe(new SimpleObserver(mCompositeDisposable) {
                    @Override
                    public void call(Object o) {
                        getView().feedSuccess();
                    }


                });
    }
}
